'''
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License") you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *     http:#www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
'''


#import java.util.*;

'''
 * The interface for classes that listen for model-changed events. In all cases,
 * the argument is [a copy of] the item that has been presented to the model,
 * or its underlying graph, for addition or removal. For an add, the item [or parts
 * of that item] may have already been present in the model for remove, the
 * item [or parts of it] need not have been absent from the item.
 * <p>
 * NOTE that the listener is supplied with more-or-less faithful copies of the
 * original items that were added to, or removed from, the model. In particular,
 * graph-level updates to the model appear as statements, not triples.
'''
from abc import ABC, abstractmethod

class ModelChangedListener (ABC):
    '''
     * Method to call when a single statement has been added to the attached model.
     *
     * @param s the statement that has been presented for addition.
    '''
    # param Statement s
    # result void
    @abstractmethod
    def addedStatement(self, s):
        pass

    '''
     * Method to call when an array of statements has been added to the attached
     * model. NOTE. This array need not be == to the array added using
     * Model::add(Statement[]).
     *
     * @param statements the array of added statements
    '''
    # param Statement[] statements
    # result void
    @abstractmethod
    def addedStatements(self, statements):
        pass

    '''
     * Method to call when a list of statements has been added to the attached model.
     * NOTE. This list need not be == to the list added using Model::add(List).
     *
     * @param statements the list of statements that has been removed.
    '''
    # param List<Statement> statements
    # result void
    @abstractmethod
    def addedStatements(self, statements):
        pass

    '''
     * Method to call when a statement iterator has supplied elements to be added
     * to the attached model. <code>statements</code> is a copy of the
     * original iterator.
     *
     * @param statements
    '''
    # param StmtIterator statements
    # result void
    @abstractmethod
    def addedStatements(self, statements):
        pass

    '''
     * Method to call when a model has been used to define the statements to
     * be added to our attached model.
     *
     * @param m a model equivalent to [and sharing with] the added model
    '''
    # param Model m
    # result void
    @abstractmethod
    def addedStatements(self, m):
        pass

    '''
     * Method to call when a single statement has been removed from the attached model.
     *
     * @param s the statement that has been presented for removal.
    '''
    # param Statement s
    # result void
    @abstractmethod
    def removedStatement(self, s):
        pass

    '''
     * Method to call when an array of statements has been removed from the
     * attached model. NOTE. This array need not be == to the array added using
     * Model::remove(Statement[]).
     *
     * @param statements the array of removed statements
    '''
    # param Statement[] statements
    # result void
    @abstractmethod
    def removedStatements(self, statements):
        pass

    '''
     * Method to call when a list of statements has been deleted from the attached
     * model. NOTE. This list need not be == to the list added using
     * Model::remove(List).
     *
     * @param statements the list of statements that have been removed.
    '''
    # param List<Statement> statements
    # result void
    @abstractmethod
    def removedStatements(self, statements):
        pass

    '''
     * Method to call when a statement iterator has been used to remove
     * statements from the attached model. The iterator will be a copy, in the
     * correct order, of the iterator supplied for the removal.
     *
     * @param statements a statement-type copy of the updating iterator
    '''
    # param StmtIterator statements
    # result void
    @abstractmethod
    def removedStatements(self, statements):
        pass

    '''
     * Method to call when a model has been used to remove statements from
     * our attached model.
     *
     * @param m a model equivalent to [and sharing with] the one removed
    '''

    # param Model m
    # result void
    @abstractmethod
    def removedStatements(self, m):
        pass

    # param Model m, Object event
    # result void
    @abstractmethod
    def notifyEvent(self, m, event):
        pass

